[ADD] estate: property model with fields, views, and menu access#1177
[ADD] estate: property model with fields, views, and menu access#1177karimgamaleldin wants to merge 4 commits intoodoo:19.0from
Conversation
karimgamaleldin
commented
Feb 16, 2026
- Add estate_property model with fields
- Add active field with default True
- Set date_availability default to 3 months from today
- Create list, form, and search views for estate.property
- Add search filters and group by postcode
- Configure access rights in ir.model.access.csv
- Add estate_property model with fields - Add active field with default True - Set date_availability default to 3 months from today - Create list, form, and search views for estate.property - Add search filters and group by postcode - Configure access rights in ir.model.access.csv
* Add estate.property.type model with form view and Settings menu * Add estate.property.tag model with form view and Settings menu * Add estate.property.offer model with form/list views for tracking offers * Update estate.property model with: - property_type_id: Many2one relation to property types - tag_ids: Many2many relation to property tags - offer_ids: One2many relation to offers - buyer_id and salesperson_id fields * Update property form view to display tags, type, offers, buyer, and salesperson * Reorganize menus: Advertisements and Settings submenus * Add security access rules for all new models
* estate.property: - Add total_area computed field (living_area + garden_area) - Add best_offer computed field (max of offer prices) - Add onchange method for garden field to auto-populate garden_area and orientation * estate.property.offer: - Add validity field (days, default 7) - Add date_deadline computed field based on create_date + validity - Add inverse method to update validity when deadline is changed * Update views to display new computed fields (total_area, best_offer) * Update offer views to include validity and date_deadline fields
blse-odoo
left a comment
There was a problem hiding this comment.
This looks good. Could you make one commit per chapter, to make it easier to review?
| name = fields.Char(required=True) | ||
| description = fields.Text() | ||
| postcode = fields.Char() | ||
| date_availability = fields.Date(copy=False, default=get_date_in_3_months()) |
There was a problem hiding this comment.
The default argument will be the result of get_date_in_3_months when this model is loaded, not when records are created: If you start your database on the 01/01, get_date_in_3_months() will return the 01/04. But this value will always be used, if a user create a new record a few days later for example on the 17/01, the default will still be 01/04. You can use a lamdba (like for salesperson in the next commit) to compute it when the record is created
| # from . import estate_property_type No newline at end of file | ||
| from . import estate_property_type | ||
| from . import estate_property_tag | ||
| from . import estate_property_offer No newline at end of file |
There was a problem hiding this comment.
Some of the files do not finish by a newline character. git is a bit limited about that, and this may cause diffs to be slightly larger than they need to be.
Could you ensure that all files ends with a newline?
* estate.property:
- Add action_set_sold() method to mark property as sold
- Add action_cancel() method to cancel property
- Add validation: prevent selling canceled properties
- Add validation: prevent canceling sold properties
* estate.property.offer:
- Add accept_offer() method: sets status to accepted, updates selling price,
property state, and buyer
- Add refuse_offer() method: sets status to refused, updates property state
* Update views:
- Add "Mark as Sold" and "Cancel" buttons to property form header
- Add accept/refuse buttons (icons) to offer list view
